package com.zhiy.com.estation.ui.fragment.updata;

import com.zhiy.com.estation.api.Api;
import com.zhiy.com.estation.api.ApiResult;
import com.zhiy.com.estation.model.User;

import java.util.HashMap;

import io.reactivex.Flowable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Created by Zyh on 2016/12/6.
 */
public class UpdataModel implements UpdataContract.Model {
    @Override
    public Flowable<ApiResult<User>> updata(HashMap<String, String> map) {
        return Api.getInstance().mService
                .updata(map).
                        subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread());
    }
}
